<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="/css/share.css" type="text/css" media="screen,print" />

<script language="javascript">
$().ready(function(){
	$("#checkAll").click(function(){
		var checked_status = this.checked;	
		$(":input[id*='contact_']").each(function(){
			 this.checked = checked_status;
		});
	});
	
	$("#notifyFriend").click(function(){	
		var fs ="";	
		$(":input[id*='contact_']").each(function(){
			
			 if(this.checked){
				 fs = fs + $(this).val()+",";
			 }
			
		});
		if(fs.length>0){
			var orgValue = $("#contacts").val();
			$("#contacts").val(orgValue+fs);
		}

		var sns =  $("#snsType").val();
		if(sns=='none'){
			$("#snsType").val("${tp}"+",")
		}else{
			$("#snsType").val(sns+"${tp}"+",")
		}	

		closeDialog("listing");
	});
	$("#dontNotify").click(function(){
		closeDialog("listing");
	});
});
</script>
</head>
<body>

<div class="listbox">
            <p>选出您想要通知的朋友,系统会帮您寄送通知信到他们的联系邮箱。</p>
            <p><img alt="" src="/images/share/line2.gif"></p>
       <h2>贴心提醒：如果联系人中有您不想要寄送的，请记得取消勾选！</h2>
      <div class="tablezone">
<table width="520" cellspacing="0" cellpadding="0" border="0">
            <tbody><tr>
            <td class="tbox01"><input type="checkbox" id="checkAll" name="checkAll"><span class="tspan">&nbsp;全选／取消</span></td>
            </tr>
            </tbody></table>
            <div class="ttbox">
           <table cellspacing="0" cellpadding="0" class="tbox02">
			  <tbody>
			  <c-rt:forEach items="${friends}" var="contact" varStatus="contactStatus">
			  <tr>
 			   <td width="20"><span><input type="checkbox" id="contact_${contactStatus}" name="contact" value="${contact.email }"></span></td>
 			   <td><table width="100%" cellspacing="0" cellpadding="0" border="0">
 			     <tbody><tr>
 			       <td style="text-align: left; font-weight: 100; border: 0pt none; padding-left: 4px;"><span class="txt-darker">${contact.username}</span> <span class="txt-greyy">( ${contact.email } )</span></td>
		         </tr>
		        </tbody></table></td>
		     </tr>
		     </c-rt:forEach>
           </tbody></table>
</div>
             <div class="bt-box2"><a title="通知朋友" class="sendf2" href="#" id="notifyFriend"></a><a title="取消" class="cancel" href="#" id="dontNotify"></a></div>
       </div>
      </div>
</body>
</html>